<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>

<body>
  <script>
    class Fa {
      constructor(a, b) {
        this.a = a
        this.b = b
      }
      sum() {
        console.log(this.a + this.b)
      }
    }

    class Son extends Fa {
      constructor(a, b) {
        super(a, b)
        this.a = a
        this.b = b
      }
      jian() {
        console.log(this.a - this.b)
      }
    }
    var ts1 = new Son(5, 3)
    ts1.jian()
    ts1.sum()
  </script>
</body>

</html>